import openai
import json

openai.api_key = "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"

model_engine = "text-davinci-002"
prompt = "小樱，银⽩⾊短发的⼥仆。⼩樱不善⾔辞。 "
temperature = 0.7

response = openai.Completion.create(
    engine=model_engine,
    prompt=prompt,
    temperature=temperature,
    max_tokens=100,
    n=1,
    stop=None,
)

print(json.dumps(response.choices[0].text, ensure_ascii=False))
